home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / IRC / Bots⁄Utilities / ShadowBot10tr37.sit / SB10tr37 / Plugin Docs / Scripts < prev    next >
Text File  |  1996-09-29  |  3KB  |  55 lines

  1. ShadowBot Scripts
  2.  
  3. Special cases:
  4.     The Greet and Part scripts do not need to be set up through the plugins manager and are  named "JOIN #<channelname>" and "PART #<channelname>" respectively. All plugins go in the Plugins folder.
  5.  
  6. ShadowBot accepts two types of commands in scripts: flow commands and bot commands. Flow commands are always preceded with an @, bot commands are not preceded with anything.
  7.  
  8. Valid flow commands are:
  9.  
  10. @LABEL <theLabel>
  11.     Defines a label that is used with the IF and GOTO commands. Labels are case sensitive.
  12.  
  13. @ENTRY <commandName>
  14.     Defines a label which can be used to put multiple scripts into one file. For example, if you put two scripts in one file, commands "hello" and "goodbye," execution will start from the top unless you include the commands '@ENTRY hello' (for hello) and '@ENTRY goodbye' (for goodbye). (Technical note: @ENTRYs are labels with a > before the command name (@LABEL >hello, for example).)
  15.  
  16. @GOTO <theLabel>
  17.     Moves script execution to the label specified. NOTE: strange things can happen if you attempt to GOTO an undefined label.
  18.  
  19. @END
  20.     Stops script execution. If this is not the last line in your script, the last line will not be executed.
  21.  
  22. @IF <command> <modifier> <test> <goto> [<else goto>]
  23.     The most powerful of the flow control commands, IF allows you to do logic branching.
  24.  
  25.     Valid IF commands:
  26.         ACCESS - integer - use for access level checking
  27.         NICKPRESENT - string - use to check to see if someone is in the channel
  28.         NICKHASOPS - string - use to see if someone has ops
  29.         FOUNDUSER - boolean - use to see if the user was found in the userlist
  30.         AUTOOP - boolean - use to see if the user has autoops. (this checks foundUser and returns false if founduser is false)
  31.  
  32.     Valid data types:
  33.         integer - any real whole number
  34.         string - any text, 255 or less characters (see note at bottom)
  35.         boolean - true or false, denoted by the text 'TRUE' and 'FALSE'. NOTE: anything other than 'TRUE' is assumed to be 'FALSE'.
  36.  
  37.     Valid modifiers:
  38.         You can use the operators <, >, =, <>, <=, and >= (less than, greater than, equal to, not equal to, less than or equal to, and greater than or equal to) on integers and strings, and = and <> on booleans.
  39.  
  40.     Branching: the <goto> and <else goto> parameters
  41.         If the contition in the IF command is true, execution jumps to the label specified by the <goto> parameter. If <else goto> is specified, execution jumps there if the IF statement is false, otherwise it continues on the next line.
  42.  
  43.     Examples:
  44.     @IF NICKPRESENT = $ARG1 nickFound nickNotPresent
  45.         If the nick passed by the first parameter passed to the plugin is on the channel, execution jumps to nickFound, otherwise it goes to nickNotPresent.
  46.     @IF ACCESS < 400 noAccess
  47.         If the access is less than 400, jump to label noAccess, else continue execution with the next command.
  48.  
  49. Other Commands:
  50.  
  51. @DELAY <numTicks> - Pauses execution for numTicks ticks. (A tick is 1/60 of a second.)
  52.  
  53. NOTE: Lines have a 255 character limit; this includes any variables that are expanded.
  54.  
  55. NOTE: It would be a Bad Idea to use plugins made for ShadowBot 1.0tr35 and later with versions 1.0tr34 and earlier.